import cv2
import imutils
import numpy as np
from fuzzy2 import Gdt
from fuzzy2 import Ai
from fuzzy2 import compare

def Fuzzyscan(binaryimage,grayimage) :
    area=len(binaryimage[binaryimage==0])
    gm=cv2.mean(grayimage)[0]
    x=[]
    #gdt先是填涂再是未填涂
    if compare(Ai(Gdt(gm,127.8321104,84.31149125),Gdt(area,691.8513514,91809)),Ai(Gdt(gm,201.265412,78.53247543),Gdt(area,11.1565254,249032.0686)))==1 :
            x.append("有瑕疵")
    
    if len(x)!=0:
        return (' '.join(x))

   
    
        
    